package com.keepsport.keepsportapi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.keepsport.keepsportapi.dao.IntroduceDao;
import com.keepsport.keepsportapi.entity.Introduce;
import com.keepsport.keepsportapi.service.intf.IntroduceService;
import com.keepsport.keepsportapi.vo.R;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class IntroduceServiceImpl implements IntroduceService {
    @Resource
    private IntroduceDao dao;
    @Override
    public R introduAll() {

            QueryWrapper<Introduce> queryWrapper = new QueryWrapper<>();
            List<Introduce> introduces = dao.selectList(queryWrapper);
            if(introduces!=null) {
                return R.ok(introduces);
            }

       return R.fail();
    }
}
